﻿@model IEnumerable<BskLeague.Models.Match>

@{
    ViewBag.Title = "Terminarz";
}

@Html.Partial("_Submenu") <br />

<div>
@Html.ActionLink("Terminarz PDF", "SchedulePDF") 
</div>
<br />
<div>
<table>
    <tr>
        <th>
            Gospodarze
        </th>
        <th>
        </th>
        <th>
        </th>
        <th>
            Goście
        </th>
        <th>
            Data
        </th>
        <th>
            Kolejka
        </th>
        <th>
            Miejsce
        </th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.ActionLink(item.Team1.TeamName, "Details", "Team", new {id = item.Team1.TeamId}, null)           
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.FinalScore1)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.FinalScore2)
        </td>
        <td>
            @Html.ActionLink(item.Team2.TeamName, "Details", "Team", new { id = item.Team2.TeamId}, null)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Date)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Round)
        </td>
        <td>
            @Html.ActionLink("...", "Details", "Stadium", new { id = item.Place.stadiumId }, null)
        </td>


    </tr>
}

</table>
</div>